﻿using System;
using System.Collections.Generic;
using System.Text;
using Model;

namespace BLL
{
    public class Order
    {
        //修改订单账户，应用于用户修改账户
        public int UpdOrderAct(string account, string oldact)
        {
            DAL.Order order = new DAL.Order();
            return order.UpdateOrderAct(account, oldact);
        }
        //添加订单
        public int AddOrder(OrderInfo order)
        {
            DAL.Order ord = new DAL.Order();
            return ord.InsertOrder(order);
        }
        //根据用户account删除其所有订单
        public int DelOrder(string account)
        {
            DAL.Order ord = new DAL.Order();
            return ord.DeleteOrder(account);
        }
        //根据用户act获取其所有订单
        public List<OrderInfo> GetOrderInfo(string account)
        {
            DAL.Order ord = new DAL.Order();
            return ord.GetOrderInfo(account);
        }

    }
}
